<html><body>
<style>

body, h1, h2, h3, div, span, p, pre, a {
  margin: 0;
  padding: 0;
  border: 0;
  font-weight: inherit;
  font-style: inherit;
  font-size: 100%;
  font-family: inherit;
  vertical-align: baseline;
}

body {
  font-size: 13px;
  padding: 1em;
}

h1 {
  font-size: 26px;
  margin-bottom: 1em;
}

h2 {
  font-size: 24px;
  margin-bottom: 1em;
}

h3 {
  font-size: 20px;
  margin-bottom: 1em;
  margin-top: 1em;
}

pre, code {
  line-height: 1.5;
  font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
}

pre {
  margin-top: 0.5em;
}

h1, h2, h3, p {
  font-family: Arial, sans serif;
}

h1, h2, h3 {
  border-bottom: solid #CCC 1px;
}

.toc_element {
  margin-top: 0.5em;
}

.firstline {
  margin-left: 2 em;
}

.method  {
  margin-top: 1em;
  border: solid 1px #CCC;
  padding: 1em;
  background: #EEE;
}

.details {
  font-weight: bold;
  font-size: 14px;
}

</style>

<h1><a href="youtube_v3.html">YouTube Data API</a> . <a href="youtube_v3.comments.html">comments</a></h1>
<h2>Instance Methods</h2>
<p class="toc_element">
  <code><a href="#delete">delete(id)</a></code></p>
<p class="firstline">Deletes a comment.</p>
<p class="toc_element">
  <code><a href="#insert">insert(part, body)</a></code></p>
<p class="firstline">Creates a reply to an existing comment. Note: To create a top-level comment, use the commentThreads.insert method.</p>
<p class="toc_element">
  <code><a href="#list">list(part, pageToken=None, maxResults=None, id=None, parentId=None, textFormat=None)</a></code></p>
<p class="firstline">Returns a list of comments that match the API request parameters.</p>
<p class="toc_element">
  <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
<p class="firstline">Retrieves the next page of results.</p>
<p class="toc_element">
  <code><a href="#markAsSpam">markAsSpam(id)</a></code></p>
<p class="firstline">Expresses the caller's opinion that one or more comments should be flagged as spam.</p>
<p class="toc_element">
  <code><a href="#setModerationStatus">setModerationStatus(id, moderationStatus, banAuthor=None)</a></code></p>
<p class="firstline">Sets the moderation status of one or more comments. The API request must be authorized by the owner of the channel or video associated with the comments.</p>
<p class="toc_element">
  <code><a href="#update">update(part, body)</a></code></p>
<p class="firstline">Modifies a comment.</p>
<h3>Method Details</h3>
<div class="method">
    <code class="details" id="delete">delete(id)</code>
  <pre>Deletes a comment.

Args:
  id: string, The id parameter specifies the comment ID for the resource that is being deleted. (required)
</pre>
</div>

<div class="method">
    <code class="details" id="insert">insert(part, body)</code>
  <pre>Creates a reply to an existing comment. Note: To create a top-level comment, use the commentThreads.insert method.

Args:
  part: string, The part parameter identifies the properties that the API response will include. Set the parameter value to snippet. The snippet part has a quota cost of 2 units. (required)
  body: object, The request body. (required)
    The object takes the form of:

{ # A comment represents a single YouTube comment.
  "snippet": { # Basic details about a comment, such as its author and text. # The snippet object contains basic details about the comment.
    "authorChannelUrl": "A String", # Link to the author's YouTube channel, if any.
    "viewerRating": "A String", # The rating the viewer has given to this comment. For the time being this will never return RATE_TYPE_DISLIKE and instead return RATE_TYPE_NONE. This may change in the future.
    "authorDisplayName": "A String", # The name of the user who posted the comment.
    "channelId": "A String", # The id of the corresponding YouTube channel. In case of a channel comment this is the channel the comment refers to. In case of a video comment it's the video's channel.
    "videoId": "A String", # The ID of the video the comment refers to, if any.
    "moderationStatus": "A String", # The comment's moderation status. Will not be set if the comments were requested through the id filter.
    "likeCount": 42, # The total number of likes this comment has received.
    "authorChannelId": "", # The id of the author's YouTube channel, if any.
    "parentId": "A String", # The unique id of the parent comment, only set for replies.
    "publishedAt": "A String", # The date and time when the comment was orignally published. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format.
    "canRate": True or False, # Whether the current viewer can rate this comment.
    "textOriginal": "A String", # The comment's original raw text as initially posted or last updated. The original text will only be returned if it is accessible to the viewer, which is only guaranteed if the viewer is the comment's author.
    "updatedAt": "A String", # The date and time when was last updated . The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format.
    "authorProfileImageUrl": "A String", # The URL for the avatar of the user who posted the comment.
    "authorGoogleplusProfileUrl": "A String", # Link to the author's Google+ profile, if any.
    "textDisplay": "A String", # The comment's text. The format is either plain text or HTML dependent on what has been requested. Even the plain text representation may differ from the text originally posted in that it may replace video links with video titles etc.
  },
  "kind": "youtube#comment", # Identifies what kind of resource this is. Value: the fixed string "youtube#comment".
  "etag": "A String", # Etag of this resource.
  "id": "A String", # The ID that YouTube uses to uniquely identify the comment.
}


Returns:
  An object of the form:

    { # A comment represents a single YouTube comment.
    "snippet": { # Basic details about a comment, such as its author and text. # The snippet object contains basic details about the comment.
      "authorChannelUrl": "A String", # Link to the author's YouTube channel, if any.
      "viewerRating": "A String", # The rating the viewer has given to this comment. For the time being this will never return RATE_TYPE_DISLIKE and instead return RATE_TYPE_NONE. This may change in the future.
      "authorDisplayName": "A String", # The name of the user who posted the comment.
      "channelId": "A String", # The id of the corresponding YouTube channel. In case of a channel comment this is the channel the comment refers to. In case of a video comment it's the video's channel.
      "videoId": "A String", # The ID of the video the comment refers to, if any.
      "moderationStatus": "A String", # The comment's moderation status. Will not be set if the comments were requested through the id filter.
      "likeCount": 42, # The total number of likes this comment has received.
      "authorChannelId": "", # The id of the author's YouTube channel, if any.
      "parentId": "A String", # The unique id of the parent comment, only set for replies.
      "publishedAt": "A String", # The date and time when the comment was orignally published. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format.
      "canRate": True or False, # Whether the current viewer can rate this comment.
      "textOriginal": "A String", # The comment's original raw text as initially posted or last updated. The original text will only be returned if it is accessible to the viewer, which is only guaranteed if the viewer is the comment's author.
      "updatedAt": "A String", # The date and time when was last updated . The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format.
      "authorProfileImageUrl": "A String", # The URL for the avatar of the user who posted the comment.
      "authorGoogleplusProfileUrl": "A String", # Link to the author's Google+ profile, if any.
      "textDisplay": "A String", # The comment's text. The format is either plain text or HTML dependent on what has been requested. Even the plain text representation may differ from the text originally posted in that it may replace video links with video titles etc.
    },
    "kind": "youtube#comment", # Identifies what kind of resource this is. Value: the fixed string "youtube#comment".
    "etag": "A String", # Etag of this resource.
    "id": "A String", # The ID that YouTube uses to uniquely identify the comment.
  }</pre>
</div>

<div class="method">
    <code class="details" id="list">list(part, pageToken=None, maxResults=None, id=None, parentId=None, textFormat=None)</code>
  <pre>Returns a list of comments that match the API request parameters.

Args:
  part: string, The part parameter specifies a comma-separated list of one or more comment resource properties that the API response will include. (required)
  pageToken: string, The pageToken parameter identifies a specific page in the result set that should be returned. In an API response, the nextPageToken property identifies the next page of the result that can be retrieved.

Note: This parameter is not supported for use in conjunction with the id parameter.
  maxResults: integer, The maxResults parameter specifies the maximum number of items that should be returned in the result set.

Note: This parameter is not supported for use in conjunction with the id parameter.
  id: string, The id parameter specifies a comma-separated list of comment IDs for the resources that are being retrieved. In a comment resource, the id property specifies the comment's ID.
  parentId: string, The parentId parameter specifies the ID of the comment for which replies should be retrieved.

Note: YouTube currently supports replies only for top-level comments. However, replies to replies may be supported in the future.
  textFormat: string, This parameter indicates whether the API should return comments formatted as HTML or as plain text.
    Allowed values
      html - Returns the comments in HTML format. This is the default value.
      plainText - Returns the comments in plain text format.

Returns:
  An object of the form:

    {
    "eventId": "A String", # Serialized EventId of the request which produced this response.
    "nextPageToken": "A String", # The token that can be used as the value of the pageToken parameter to retrieve the next page in the result set.
    "kind": "youtube#commentListResponse", # Identifies what kind of resource this is. Value: the fixed string "youtube#commentListResponse".
    "visitorId": "A String", # The visitorId identifies the visitor.
    "items": [ # A list of comments that match the request criteria.
      { # A comment represents a single YouTube comment.
        "snippet": { # Basic details about a comment, such as its author and text. # The snippet object contains basic details about the comment.
          "authorChannelUrl": "A String", # Link to the author's YouTube channel, if any.
          "viewerRating": "A String", # The rating the viewer has given to this comment. For the time being this will never return RATE_TYPE_DISLIKE and instead return RATE_TYPE_NONE. This may change in the future.
          "authorDisplayName": "A String", # The name of the user who posted the comment.
          "channelId": "A String", # The id of the corresponding YouTube channel. In case of a channel comment this is the channel the comment refers to. In case of a video comment it's the video's channel.
          "videoId": "A String", # The ID of the video the comment refers to, if any.
          "moderationStatus": "A String", # The comment's moderation status. Will not be set if the comments were requested through the id filter.
          "likeCount": 42, # The total number of likes this comment has received.
          "authorChannelId": "", # The id of the author's YouTube channel, if any.
          "parentId": "A String", # The unique id of the parent comment, only set for replies.
          "publishedAt": "A String", # The date and time when the comment was orignally published. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format.
          "canRate": True or False, # Whether the current viewer can rate this comment.
          "textOriginal": "A String", # The comment's original raw text as initially posted or last updated. The original text will only be returned if it is accessible to the viewer, which is only guaranteed if the viewer is the comment's author.
          "updatedAt": "A String", # The date and time when was last updated . The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format.
          "authorProfileImageUrl": "A String", # The URL for the avatar of the user who posted the comment.
          "authorGoogleplusProfileUrl": "A String", # Link to the author's Google+ profile, if any.
          "textDisplay": "A String", # The comment's text. The format is either plain text or HTML dependent on what has been requested. Even the plain text representation may differ from the text originally posted in that it may replace video links with video titles etc.
        },
        "kind": "youtube#comment", # Identifies what kind of resource this is. Value: the fixed string "youtube#comment".
        "etag": "A String", # Etag of this resource.
        "id": "A String", # The ID that YouTube uses to uniquely identify the comment.
      },
    ],
    "tokenPagination": { # Stub token pagination template to suppress results.
    },
    "etag": "A String", # Etag of this resource.
    "pageInfo": { # Paging details for lists of resources, including total number of items available and number of resources returned in a single page.
      "totalResults": 42, # The total number of results in the result set.
      "resultsPerPage": 42, # The number of results included in the API response.
    },
  }</pre>
</div>

<div class="method">
    <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
  <pre>Retrieves the next page of results.

Args:
  previous_request: The request for the previous page. (required)
  previous_response: The response from the request for the previous page. (required)

Returns:
  A request object that you can call 'execute()' on to request the next
  page. Returns None if there are no more items in the collection.
    </pre>
</div>

<div class="method">
    <code class="details" id="markAsSpam">markAsSpam(id)</code>
  <pre>Expresses the caller's opinion that one or more comments should be flagged as spam.

Args:
  id: string, The id parameter specifies a comma-separated list of IDs of comments that the caller believes should be classified as spam. (required)
</pre>
</div>

<div class="method">
    <code class="details" id="setModerationStatus">setModerationStatus(id, moderationStatus, banAuthor=None)</code>
  <pre>Sets the moderation status of one or more comments. The API request must be authorized by the owner of the channel or video associated with the comments.

Args:
  id: string, The id parameter specifies a comma-separated list of IDs that identify the comments for which you are updating the moderation status. (required)
  moderationStatus: string, Identifies the new moderation status of the specified comments. (required)
    Allowed values
      heldForReview - Marks a comment as awaiting review by a moderator.
      published - Clears a comment for public display.
      rejected - Rejects a comment as being unfit for display. This action also effectively hides all replies to the rejected comment.

Note: The API does not currently provide a way to list or otherwise discover rejected comments. However, you can change the moderation status of a rejected comment if you still know its ID. If you were to change the moderation status of a rejected comment, the comment replies would subsequently be discoverable again as well.
  banAuthor: boolean, The banAuthor parameter lets you indicate that you want to automatically reject any additional comments written by the comment's author. Set the parameter value to true to ban the author.

Note: This parameter is only valid if the moderationStatus parameter is also set to rejected.
</pre>
</div>

<div class="method">
    <code class="details" id="update">update(part, body)</code>
  <pre>Modifies a comment.

Args:
  part: string, The part parameter identifies the properties that the API response will include. You must at least include the snippet part in the parameter value since that part contains all of the properties that the API request can update. (required)
  body: object, The request body. (required)
    The object takes the form of:

{ # A comment represents a single YouTube comment.
  "snippet": { # Basic details about a comment, such as its author and text. # The snippet object contains basic details about the comment.
    "authorChannelUrl": "A String", # Link to the author's YouTube channel, if any.
    "viewerRating": "A String", # The rating the viewer has given to this comment. For the time being this will never return RATE_TYPE_DISLIKE and instead return RATE_TYPE_NONE. This may change in the future.
    "authorDisplayName": "A String", # The name of the user who posted the comment.
    "channelId": "A String", # The id of the corresponding YouTube channel. In case of a channel comment this is the channel the comment refers to. In case of a video comment it's the video's channel.
    "videoId": "A String", # The ID of the video the comment refers to, if any.
    "moderationStatus": "A String", # The comment's moderation status. Will not be set if the comments were requested through the id filter.
    "likeCount": 42, # The total number of likes this comment has received.
    "authorChannelId": "", # The id of the author's YouTube channel, if any.
    "parentId": "A String", # The unique id of the parent comment, only set for replies.
    "publishedAt": "A String", # The date and time when the comment was orignally published. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format.
    "canRate": True or False, # Whether the current viewer can rate this comment.
    "textOriginal": "A String", # The comment's original raw text as initially posted or last updated. The original text will only be returned if it is accessible to the viewer, which is only guaranteed if the viewer is the comment's author.
    "updatedAt": "A String", # The date and time when was last updated . The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format.
    "authorProfileImageUrl": "A String", # The URL for the avatar of the user who posted the comment.
    "authorGoogleplusProfileUrl": "A String", # Link to the author's Google+ profile, if any.
    "textDisplay": "A String", # The comment's text. The format is either plain text or HTML dependent on what has been requested. Even the plain text representation may differ from the text originally posted in that it may replace video links with video titles etc.
  },
  "kind": "youtube#comment", # Identifies what kind of resource this is. Value: the fixed string "youtube#comment".
  "etag": "A String", # Etag of this resource.
  "id": "A String", # The ID that YouTube uses to uniquely identify the comment.
}


Returns:
  An object of the form:

    { # A comment represents a single YouTube comment.
    "snippet": { # Basic details about a comment, such as its author and text. # The snippet object contains basic details about the comment.
      "authorChannelUrl": "A String", # Link to the author's YouTube channel, if any.
      "viewerRating": "A String", # The rating the viewer has given to this comment. For the time being this will never return RATE_TYPE_DISLIKE and instead return RATE_TYPE_NONE. This may change in the future.
      "authorDisplayName": "A String", # The name of the user who posted the comment.
      "channelId": "A String", # The id of the corresponding YouTube channel. In case of a channel comment this is the channel the comment refers to. In case of a video comment it's the video's channel.
      "videoId": "A String", # The ID of the video the comment refers to, if any.
      "moderationStatus": "A String", # The comment's moderation status. Will not be set if the comments were requested through the id filter.
      "likeCount": 42, # The total number of likes this comment has received.
      "authorChannelId": "", # The id of the author's YouTube channel, if any.
      "parentId": "A String", # The unique id of the parent comment, only set for replies.
      "publishedAt": "A String", # The date and time when the comment was orignally published. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format.
      "canRate": True or False, # Whether the current viewer can rate this comment.
      "textOriginal": "A String", # The comment's original raw text as initially posted or last updated. The original text will only be returned if it is accessible to the viewer, which is only guaranteed if the viewer is the comment's author.
      "updatedAt": "A String", # The date and time when was last updated . The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format.
      "authorProfileImageUrl": "A String", # The URL for the avatar of the user who posted the comment.
      "authorGoogleplusProfileUrl": "A String", # Link to the author's Google+ profile, if any.
      "textDisplay": "A String", # The comment's text. The format is either plain text or HTML dependent on what has been requested. Even the plain text representation may differ from the text originally posted in that it may replace video links with video titles etc.
    },
    "kind": "youtube#comment", # Identifies what kind of resource this is. Value: the fixed string "youtube#comment".
    "etag": "A String", # Etag of this resource.
    "id": "A String", # The ID that YouTube uses to uniquely identify the comment.
  }</pre>
</div>

</body></html>